<?php
    use User\Model\MeetingModel;
?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
<meta name="apple-touch-fullscreen" content="YES">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="stylesheet" href="/Public/projects/meeting/css/ydui.css"/>
<link rel="stylesheet" href="/Public/projects/meeting/css/meetbase.css">
<link rel="stylesheet" href="/Public/projects/meeting/css/iconfont.css">
<title>{$meet['name']}</title>
</head>
<style>
    .camera-area{
        background-color: white;
    }
    .bg{
        background-repeat: no-repeat;
        background-position: center center;
        background-size: 100% 100%;
    }
    img:not([src]){
        visibility: hidden;
    }
    .required::after{
        content: '*';
        color: #f00;
    }
    .upload-block{
        position: relative;
        margin: 0 4%;
        border-radius: 5px;
        overflow: hidden;
        color: #fff;
    }
    .upload-block .upload-title{
        font-size: 16px;
        color: #696969;
    }
    .upload-block .upload-tips{
        font-size: 16px;
        color: #696969;
        text-align: center;
    }
    .upload-block .upload-cover{
        height: 120px;
        width: 120px;
        background-image: url('/Public/images/cover.jpg');
        background-size: auto 70%;
        margin: 0 auto;
    }
    .upload-block .upload-cover img{
        width: 100%;
        height: 100%;
        pointer-events: none;
    }
    .upload-block input.fileToUpload{
        opacity: 0;
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
    }
    .loading{
        position: fixed;
        width: 100%;
        height: 100%;
        top: 0;
        z-index: 99;

        background-image: url(/Public/images/loader.gif);
        background-size: 2rem 2rem;
    }
    .loading.hide{
        display: none;
    }
    #mask_new {
         background-color: rgba(0, 0, 0, 0.7);
         z-index: 9;
         width: 100%;
         height: 100%;
         position: fixed;
         top: 0;
         left: 0;
         display:none;
     }
</style>
<body>
<!---------内页---------------->
<div class="loginSuccess"><p>报名成功</p></div>
<div class="loginFail" ><p>报名失败</p></div>
<div id="mask_new"></div>
<div class="loading hide bg"></div>
<div class="insidepage">
    <?php
    $is_register = I("get.is_register", "", "");
    $is_getticket = I("get.is_getticket", "", "");
    if((!$is_register || !$register_status) && !$is_getticket){?>
    <div class="topbanner">
        <img src="<?php echo empty($img) ? '':$img; ?>" alt="">
    </div>
    <?php }?>
    <div class="tabBox">
    <!----------富文本编辑----------------->
        <?php
        $is_register = I("get.is_register", "", "");
        $is_getticket = I("get.is_getticket", "", "");
        if(!empty($menu) && !$is_register && !$is_getticket){
            if($menu['type'] == MeetingModel::MENU_PIC_TEXT){
                echo '<div class="imglist" ><ul class="ulimglist">';
                    foreach($content as $c_value){
                        if($c_value['type'] == MeetingModel::MENU_PIC_TEXT){
                            if(!empty($c_value['link'])){
                                echo '<a href="' . $c_value['link'] . '">';
                            }
                            echo "<li";
                            if(!empty($c_value['content'])){
                                echo " class='hasdetail'";
                            }
                            echo "><img alt='' class='piclist' src='" . $c_value['picurl'] . "'>";
                            echo '<p class="imglistName">' . $c_value['title'] . '</p>';
                            echo '<p class="pabstract">' . $c_value['describe'] . '</p>';
                            if(!empty($c_value['content'])){
                                echo '<span class="amore colourway">详情&gt;&gt;</span><div class="person_detail" style="display: none">' . $c_value['content'] . '</div>';
                            }
                            echo '</li>';
                            if(!empty($c_value['link'])){
                                echo '</a>';
                            }
                        }
                    }
                    echo '</ul></div>';
                    if($item_more){
                        echo '<div class="listLoad"><span>下拉加载</span></div>';
                    }
                }
                if($menu['type'] == MeetingModel::MENU_TEXT){
                    echo '<div class="richTxt">';
                    echo $menu['content'];
                    echo '</div>';
                }
                if($menu['type'] == MeetingModel::MENU_TEXT_TEXT){
                    echo '<div class="borderTop"></div><div class="schedule">';
                    foreach($content as $c_value){
                        if($c_value['type'] == MeetingModel::MENU_TEXT_TEXT){
                            if($c_value['describe'] == 0){
                                echo '<ul class="ulSchedule"><li><div class="divSchedule"><span class="scheduleDate colourway">' . $c_value['title'];
                                echo '</span><span class="scheduleCont">' . $c_value['content'] . '</span></div></li></ul>';
                            }
                            if($c_value['describe'] == 1){
                                echo '<div class="ulSchedule2"> <p class="icon iconfont icon-icon-test colourway spanSchedule"><span>';
                                echo $c_value['title'] . '</span></p></div><div class="borderTop" style="height:20px;"></div>';
                            }
                            if($c_value['describe'] == 2){
                                echo '<ul class="ulSchedule2"><li><span class="scheduleTime2"><span class="spantopTime">' . $c_value['title'];
                                echo '</span><span class="spanBottom">' . $c_value['content'] . '</span></span></li></ul>';
                            }
                        }
                    }
                    echo '</div>';
                    if($item_more){
                        echo '<div class="listLoad"><span>下拉加载</span></div>';
                    }
                }
                if($menu['type'] == MeetingModel::MENU_PIC){
                    foreach($content as $c_value){
                        if($c_value['type'] == MeetingModel::MENU_PIC){
                            echo '<img class="longimage" src="' . $c_value['picurl'] . '" alt="" >';
                        }
                    }
                    if($item_more){
                        echo '<div class="listLoad"><span>下拉加载</span></div>';
                    }
                }
                if($meet['need_ticket'] && $is_wx){
                    echo '<a onclick="ajaxIndex(' . I("get.meetId", 0, "") . ',0,0,1)' . '"><span class="tickectInfo colourwaybg"><span class="font">查看电子票</span></span>';
                    if($ticket_count > 0){
                        echo '<span class="messageTips"></span>';
                    }
                    echo '</a>';
                }
            }
            if($is_register){
                if($register_status == 1){
                    echo '<div class="nostart"><p>报名未开始</p><p>' . "于" . $date_string . "开始报名" . '</p></div>';
                }elseif($register_status == 2){
                    echo '<div class="finish"><p>你来迟了活动已结束</p></div>';
                }else{
                    echo '<form class="form" method="post" action="/Wap/Meeting/register"><div class="formTable">';

                    foreach($fields as $field){
                        //--单行文本--
                        if($field['type'] == MeetingModel::FIELD_TEXT){
                            echo '<div class="divinput ';
                                        if($field['format'] == MeetingModel::FORMAT_EMAIL){
                                            echo ' parentCls ';
                                        }
                                        echo '">';
                            echo '<span class="spaninputName">' . $field['name'];
                            if($field['is_require']){
                                echo '<span class="spanrequire">*</span>';
                            }
                            echo '</span>';
                            echo '<input type="text" name="' . $field['field_id'] . '" class="inputTxt ';
                                        if($field['is_require']){
                                            echo ' notnull ';
                                        }
                                        if($field['format'] == MeetingModel::FORMAT_EMAIL){
                                            echo ' inputElem isEmail';
                                        }
                                        if($field['format'] == MeetingModel::FORMAT_NUMBER){
                                            echo ' isNumber';
                                        }
                                        if($field['format'] == MeetingModel::FORMAT_PHONE){
                                            echo ' isPhone';
                                        }
                                        if($field['format'] == MeetingModel::FORMAT_ID){
                                            echo ' isCardNo';
                                        }
                                        echo '"><span class="inputTips"></span></div>';
                        }
                        //--多行文本--
                        if($field['type'] == MeetingModel::FIELD_TEXTAREA){
                            echo '<div class="multiText">';
                            echo '<span class="spaninputName">' . $field['name'] . '</span>';
                            echo '<textarea class="textArea" name="' . $field['field_id'] . '"></textarea><span class="inputTips"></span></div>';
                        }
                        //--单选--
                        if($field['type'] == MeetingModel::FIELD_SINGLE){
                            echo '<div class="radioBox"><span class="radioName">' . $field['name'] . '</span><ul class="ulradio">';
                            $options = json_decode($field['option'], true);
                            foreach($options as $option){
                                echo '<li><div class="radio-btn "><input type="radio" class="inputRadio" name="' . $field['field_id'] . '" value="' . $option . '"/></div><span class="radiolable">' . $option . '</span></li>';
                            }
                            echo '</ul><span class="inputTips"></span></div>';
                        }
                        //--多选--
                        if($field['type'] == MeetingModel::FIELD_MULTIPLE){
                            echo '<div class="check2Box"><span class="check2BoxName">' . $field['name'] . '</span><ul class="ulcheck">';
                            $options = json_decode($field['option'], true);
                            foreach($options as $option){
                                echo '<li><div class="check-btn "><input type="checkbox" class="inputCheckbox" name="' . $field['field_id'] . '[]" value="' . $option . '"/></div><span class="checklable">' . $option . '</span></li>';
                            }
                            echo '</ul><span class="inputTips"></span></div>';
                        }
                        //--图片--
                        if($field['type'] == MeetingModel::FIELD_PIC){
                            echo '<input type="file" style="display: none"><div class="uploadimg" onclick="upload_img(this);"><span class="spaninputName">' . $field['name'] . '</span>';
                            echo '<div class="preview" ><span id="imgditu"></span><img src="/Public/projects/meeting/images/kong.jpg"></div>';
                            echo '<input type="text" name="' . $field['field_id'] . '" style="display: none">';
                            echo '<span class="spanupload">(请上传5M以内的jpg/png)</span></div>';
                        }

                        //--视频--
                        if($field['type'] == MeetingModel::FIELD_VIDEO){
                            echo '<input type="hidden" id="video" name="' . $field['field_id'] . '">';
                            echo '<div class="camera-area">
                                <form enctype="multipart/form-data" method="post">

                                    <div class="upload-block">
                                        <div class="upload-title required">上传视频（请上传200M以内的视频）</div>
                                        <div  class="upload-title" style="color: red;display: none;" id="tips">上传视频太大！</div>
                                        <div class="upload-cover bg" id="ori_img">
                                            <img>
                                        </div>
                                        <div class="upload-tips">点击上传视频</div>
                                        <input class="fileToUpload" name="fileToUpload" type="file" accept="video/*">
                                        <video id="video_show" controls="controls" style="width:100px;height:100px;" ></video>
                                    </div>
                                </form>
                            </div>';
                        }

                        if($field['type'] == MeetingModel::FIELD_DATE){
                            echo '<div class="divinput"><span class="spaninputName">' . $field['name'] . '</span>';
                            echo '<input type="text" value="" name="' . $field['field_id'] . '" class="inputTxt date_shijian"  placeholder="请选择时间"/></div>';
                        }
                        if($field['type'] == MeetingModel::FIELD_TIME){
                            echo '<div class="divinput"><span class="spaninputName">' . $field['name'] . '</span>';
                            echo '<input type="text" value="" name="' . $field['field_id'] . '" class="inputTxt datetime_shijian"  placeholder="请选择日期"/></div>';
                        }
                        if($field['type'] == MeetingModel::FIELD_RANGE){
                            echo '<div class="row select-time divinput"><span class="spaninputName">' . $field['name'] . '</span>';
                            echo '<div class="timeinput"><span class="time entertime"></span><input type="text" name="start' . $field['field_id'] . '" class="input-enter none">';
                            echo '<span class="timearrow"></span><span class="time leavetime"></span>';
                            echo '<input type="text" class="input-leave none" name="end' . $field['field_id'] . '"></div></div>';
                        }
                        if($field['type'] == MeetingModel::FIELD_CITY){
                            echo '<div class="divinput"><span class="spaninputName">' . $field['name'] . '</span>';
                            echo '<input type="text" class="inputTxt J_Address" placeholder="请输入所在地区" readonly>';
                            echo '<input class="province" type="hidden" name="province' . $field['field_id'] . '">';
                            echo '<input class="city" type="hidden" name="city' . $field['field_id'] . '">';
                            echo '<input class="district" type="hidden" name="district' . $field['field_id'] . '">';
                            echo '<span class="inputTips"></span></div>';
                        }
                        if($field['type'] == MeetingModel::FIELD_ADDRESS){
                            echo '<div class="divinput"><span class="spaninputName">' . $field['name'] . '</span>';
                            echo '<input type="text" class="inputTxt J_Address" placeholder="请输入所在地区" readonly>';
                            echo '<input class="province" type="hidden" name="province' . $field['field_id'] . '">';
                            echo '<input class="city" type="hidden" name="city' . $field['field_id'] . '">';
                            echo '<input class="district" type="hidden" name="district' . $field['field_id'] . '">';
                            echo '<span class="inputTips"></span></div>';
                            echo '<div class="multiText">
                                    <textarea class="textArea" name="address' . $field['field_id'] . '" placeholder="请输入详细地址"></textarea>
                                    <span class="inputTips"></span>
                                </div>';
                        }
                    }
                    if($meet['eat_service']){
                        echo '<div class="expandBox">
                        <div class="unexpand"><span class="spanName">餐饮<span class="spanTips">（是否）</span></span>
                            <button class="switch"><span change="开" class="offBtn">关</span>
                                <input type="hidden" value="0" name="is_eat"/>
                            </button>
                        </div>
                        <div class="expandPart">
                            <div class="divinput">
                                <span class="spaninputName">用餐人数</span>
                                <input  type="number" class="inputTxt" placeholder="请输入用餐人数" name="eat_person">
                            </div>
                            <div class="divTextarea">
                                <span class="spaninputName">备注内容</span>
                                <textarea placeholder="选项卡标题" class="textArea" name="eat_note"></textarea>
                            </div>
                        </div></div>';
                    }
                    if($meet['hotel_service']){
                        echo '<div class="expandBox">
                        <div class="unexpand"><span class="spanName">住宿<span class="spanTips">（是否）</span></span>
                            <button class="switch"><span change="开" class="offBtn">关</span>
                                <input type="hidden" value="0" name="is_hotel"/>
                            </button>
                        </div>
                        <div class="expandPart">
                            <div class="divinput">
                                <span class="spaninputName">住宿人数</span>
                                <input type="number" class="inputTxt" placeholder="请输入住宿人数" name="hotel_person">
                            </div>
                            <div class="divTextarea">
                                <span class="spaninputName">备注内容</span>
                                <textarea placeholder="选项卡标题" class="textArea" name="hotel_note"></textarea>
                            </div>
                        </div></div>';
                    }
                    if($meet['bus_service']){
                        echo '<div class="expandBox">
                        <div class="unexpand"><span class="spanName">乘车<span class="spanTips">（是否）</span></span>
                            <button class="switch"><span change="开" class="offBtn">关</span>
                                <input type="hidden" value="0" name="is_bus"/>
                            </button>
                        </div>
                        <div class="expandPart">
                            <div class="divinput">
                                <span class="spaninputName">乘车数</span>
                                <input type="number" class="inputTxt" placeholder="请输入用餐人数" name="bus_person">
                            </div>
                            <div class="divTextarea">
                                <span class="spaninputName">备注内容</span>
                                <textarea placeholder="选项卡标题" class="textArea" name="bus_note"></textarea>
                            </div>
                        </div></div>';
                    }
                    echo '<input type="hidden" name="meetId" value="' . I("get.meetId", 0, "") . '">';
                    if(!empty($meet['live'])){
                        $live_arr = explode("|", $meet['live']);
                        if(in_array(MeetingModel::LIVE_SIGNIN, $live_arr)){
                            echo '<div class="multiText">';
                            echo '<span class="spaninputName">祝福语：</span>';
                            echo '<textarea class="textArea" name="wish"></textarea><span class="inputTips"></span></div>';
                        }
                    }
                    if(sizeof($fields) <= 2){
                        echo '<div class="divinput"></div>';
                    }
                    echo '<div class="divLoginbtn"><input class="colourwaybg registeredBtn" type="submit" onclick="return form_submit();" value="提&nbsp;&nbsp;&nbsp;&nbsp;交" id="loginBtn"/></div>';
                    if($meet['need_ticket'] && $is_wx){
                        echo '<a onclick="ajaxIndex(' . I("get.meetId", 0, "") . ',0,0,1)' . '"><span class="tickectInfo colourwaybg"><span class="font">查看电子票</span></span>';
                        if($ticket_count > 0){
                            echo '<span class="messageTips"></span>';
                        }
                        echo '</a>';
                    }
                    echo '</div></form>';
                }
            }
            if($is_getticket){
                echo '<div class="ticketlist"><div class="ticketBar colourway colourwayBoder"><span class="spanTicket colourway">电子票</span><i class="icon iconfont icon-dianzifapiao"></i></div>';
                foreach($users as $user){
                    $div_ticket_state = "ticketState penusedBlock";
                    $span = "penspanused";
                    $span_state = "penusedstate";
                    $status = "待使用";
                    if($user['status'] == MeetingModel::STATUS_PENDING){
                        $div_ticket_state = "ticketState examineBlock";
                        $span = "spanExamine";
                        $span_state = "examineState";
                        $status = "审核中";
                    }
                    if($user['status'] == MeetingModel::STATUS_REFUSED){
                        $div_ticket_state = "ticketState unExamineBlock";
                        $span = "spanunExamine";
                        $span_state = "unexamineState";
                        $status = "未通过审核";
                    }
                    if($user['status'] == MeetingModel::STATUS_USED){
                        $div_ticket_state = "ticketState usedBlock";
                        $span = "spanused";
                        $span_state = "used";
                        $status = "已使用";
                    }
                    echo '<div class="' . $div_ticket_state . '" data-user-id="' . $user['user_id'] .  '" data-user-result="' .
                    $user['result'] . '" data-user-ticket="' . $user['ticket'] . '" data-meet-id="' . $user['meet_id'] . '"><span class="' .
                    $span . '"></span><span class="ticketName">' . $user['query_value1'] . '</span>
                        <span class="activtiName">' . $meet['name'] . '</span><span class="' .
                        $span_state . '">' . $status . '</span><span class="arrow"></span></div>';
                }
                echo '</div></div>';
            }
        ?>
    </div>
    <!----------富文本编辑----------------->

    <!-----------强制关注---------------->
</div>
<!----------未通过审核中---------------->
<div class="unexamineCard">
    <span class="close icon iconfont icon-cha colourway"></span>
    <div class="examineBanner"><img src="{$meet['bannerurl']}" alt=""></div>
    <div class="cardindex">
        <h1 class="h1title exmh1title"></h1>
        <span class="spanImessage">您的信息<span class="unImessage">未通过审核</span></span>
        <span class="stripe"></span>
        <span class="spanAbstract">未通过审核</span>
    </div>
</div>
<!----------未通过审核中---------------->
<!----------正在审核中---------------->
<div class="examineCard">
    <span class="close icon iconfont icon-cha colourway"></span>
    <div class="examineBanner"><img src="{$meet['bannerurl']}" alt=""></div>
    <div  class="cardindex examcardindex">
        <h1 class="h1title exmh1title"></h1>
        <span class="spanImessage">您的信息<span class="exmImessage">正在审核中</span>，请稍后...</span>
        <span class="stripe"></span>
        <div class="tickecttiao"></div>
    </div>
</div>
<!----------正在审核中---------------->
<!----------已使用---------------->
<div class="usedCard">
    <span class="close icon iconfont icon-cha colourway"></span>
    <div class="examineBanner"><img src="{$meet['bannerurl']}" alt=""></div>
    <div  class="cardindex usedCardindex">
        <h1 class="h1title exmh1title"><span class="spantxt">{$meet['ticket_desc']}</span></h1>
        <span class="stripe"></span>
        <div class="ecode"><span class="usedlabe"></span><img src="" alt=""></div>
        <div class="ecodeBtn colourwaybg">点击查看会议资讯</div>
    </div>
</div>
<!----------已使用---------------->
<!----------未使用---------------->
<div class="penusedCard">
    <span class="close icon iconfont icon-cha colourway"></span>
    <div class="examineBanner"><img src="{$meet['bannerurl']}" alt=""></div>
    <div  class="cardindex usedCardindex">
        <h1 class="h1title exmh1title"><span class="spantxt">{$meet['ticket_desc']}</span></h1>
        <span class="stripe"></span>
        <div class="ecode"><span class="penusedlabe"></span><img src="" alt=""></div>
        <div class="ecodetips"><p>请出示上方二维码</p><p>还可以使用签到码：<span></span></p></div>
        <div class="ecodeBtn colourwaybg">点击查看会议资讯</div>
        <!--<span class="divenroll">继续报名</span>-->
    </div>
</div>
<!----------未使用---------------->
<!----------强制关注--------------->
<div class="attention"><img src="{$meet['wxcode']}" alt=""><div class="attentionClose"></div>
    <div class="pattention"><p>长按二维码</p><p>关注公众号，获取更多资讯</p></div>
</div>
<div class="attentionMask"></div>
<!----------导航--------------->
<div id="navBar">
    <ul>
        <?php
            $meet_id = I("get.meetId", "", "");
            $menu_less = 4;
            if($meet['need_register']){
                $menu_less = 3;
            }
            $is_register = I("get.is_register", "", "");
            foreach($menulist as $menu_key => $menu_value){
                if($menu_key >= $menu_less){
                    continue;
                }
                echo '<li><a';
                if(!$is_register && !empty($menu) && ($menu['menu_id'] == $menu_value['menu_id'])){
                    echo ' class="colourway"';
                }
                if($menu_value['type'] == MeetingModel::MENU_LINK){
                    echo " href='" . $menu_value['link'] . "'";
                }else{
                    echo ' onclick="ajaxIndex(' . $meet_id . ',' . $menu_value['menu_id'] . ',0,0,this)" ';
                }
                echo '>' . $menu_value['name'] . '</a></li>';
             }
            if($menu_less == 3){
                echo '<li><a';
                if($is_register){
                    echo ' class="colourway"';
                }
                echo ' href="/Wap/Meeting/index?is_register=1&meetId=' . $meet_id . '" >报名</a></li>';
            }
        ?>
    </ul>
</div>

<!----------导航2--------------->
<?php
    $menu_less = 4;
    if($meet['need_register']){
        $menu_less = 3;
    }
    if(sizeof($menulist) > $menu_less){
        echo '<div class="subNav"><div class="subnavBtn colourwaybg"></div><ul class="ulSubnav colourwaybg">';
        for($i = $menu_less; $i < sizeof($menulist); $i++){
            echo '<li class="colourwaybg"><a ';
            if($menulist[$i]['type'] == MeetingModel::MENU_LINK){
                echo " href='" . $menulist[$i]['link'] . "'";
            }else{
                echo " onclick='ajaxIndex(" . $meet_id . ',' . $menulist[$i]['menu_id'] . ",0,0)'";
            }
            echo '>' . $menulist[$i]['name'] . '</a></li>';
        }
        echo '</ul></div>';
    }
?>
<!----------导航2--------------->

<!---------导航---------------->

<div class="personalList">
    <div class="divimgcont"><img src=" " class="piccont"></div>
    <div class="personCont"><p class="personName"></p><div class="personalclose colourwaybg"></div>
        <p class="pPerson"></p>
    </div>
</div>
<!---------内页--------------->
<script src="/Public/projects/meeting/js/jquery-1.7.1.min.js"></script>
<script src="/Public/projects/meeting/js/emailAutoComplete.js"></script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script>
    var share_disable = "{$share_disable}";
    wx.config({
        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
        appId: '{$appid}', // 必填，公众号的唯一标识
        timestamp: "{$timestamp}", // 必填，生成签名的时间戳
        nonceStr: '{$nonceStr}', // 必填，生成签名的随机串
        signature: '{$wxSha1}',// 必填，签名，见附录1
        jsApiList: ['onMenuShareAppMessage','onMenuShareTimeline', 'scanQRCode', 'chooseImage', 'getLocalImgData'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
    });
    wx.error(function(res){
        console.log(res);
    });
    wx.ready( function( e ){
        if(share_disable == 1){
            wx.hideAllNonBaseMenuItem();
        }
        wx.onMenuShareAppMessage({
            title: "{$share_title}",
            desc: "{$share_desc}",
            link: "{$share_url}",
            imgUrl: "{$share_pic}",
            type: 'link',
            dataUrl: '',
            success: function () {
            }
        });
        wx.onMenuShareTimeline({
            title: "{$share_title}",
            link: "{$share_url}",
            imgUrl: "{$share_pic}",
            success: function () {
            }
        });
    });
    function upload_img(e){
        var img_input = $(e).find("input[type='text']");
        var img_register = $(e).find("img");
        var input_file = $(e).prev("input[type='file']");
        if(window.__wxjs_is_wkwebview){
            wx.chooseImage({
                count: 1, // 默认9
                sizeType: ['original','compressed'], // 可以指定是原图还是压缩图，默认二者都有
                sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
                success: function (res) {
                    var localIds = res.localIds; // 返回选定照片的本地ID列表，localId可以作为img标签的src属性显示图片
                    for(var i=0; i<localIds.length;i++){
                            wx.getLocalImgData({
                                localId: localIds[i],
                                success:function(res){
                                    var localData = res.localData;
                                    img_register.attr("src", localData);
                                    img_input.val(localData);
                                },
                                fail: function(res){
                                    alert(res);
                                }
                            });

                    }
                }
            });
        }else{
            input_file.click();
            input_file.on("change",function() {
                console.log(input_file);
                var file = this.files[0];
                if(!/image\/\w+/.test(file.type)){
                    alert("请确保文件为图像类型");
                    return false;
                }
                var reader=new FileReader();
                reader.readAsDataURL(file);
                reader.onload = function() {
                    img_register.attr("src", this.result);
                    img_input.val(this.result);
                };
            });
        }
    }
    var page = 0;
    var menuId = "{$menu['menu_id']}";
    var meetId = "{$menu['meet_id']}";
    var color = "{$meet['theme_color']}";
    var type = "{$menu['type']}";
    var end = 0;
    $(window).bind('scroll', function () {
        if((type == 0 || type == 2) && !end){
            if ($(document).scrollTop() == $(document).height() - $(window).height()) {
                page++;
                $.ajax({
                    url:'/Wap/Meeting/ajaxContent',
                    type:'get',
                    dataType:'json',
                    data:{
                        page:page,
                        menuId:menuId,
                        meetId:meetId
                    },
                    success:function(res) {
                        if(res.length == 0){
                            $(".listLoad").remove();
                            $(".richTxt").append("<div class='nodata'>别滚动了，已经到底了...</div>");
                            end = 1;
                            return false;
                        }
                        if (type == 0) {
                            var item_li = '';
                            for(var i=0; i<res.length; i++){
                                if(res[i]['link']){
                                    item_li += '<a href="' + res[i]['link'] + '">';
                                }
                                item_li += "<li><img alt='' src='" + res[i]['picurl'] + "'>";
                                item_li += '<p class="imglistName">' + res[i]['content'] + '</p>';
                                item_li += '<p class="pabstract">' + res[i]['describe'] + '</p></li>';
                                if(res[i]['link']){
                                    item_li += '</a>';
                                }
                            }
                            $(".imglist .ulimglist").append(item_li);
                            return true;
                        }
                        if (type == 2) {
                            var text_li = '';
                            for(var j=0; j<res.length; j++){
                                text_li += '<li><div class="divSchedule"><span class="scheduleDate colourway">' + res[j]['title'];
                                text_li += '</span><span class="scheduleCont">' + res[j]['content'] + '</span></div></li>';
                            }
                            $(".schedule .ulSchedule").append(text_li);
                            return true;
                        }
                    }
                });
            }
        }
    });
</script>
<script src="/Public/projects/meeting/js/common.js"></script>
<script>
    $(function(){
        //--报名返回页面判断--
        var result = <?php echo I("get.registered", 0, '');?>;
        var note = '<?php echo I("get.note", 0, "");?>';
        if(result == 1){
            if(note != 0){
                $(".loginSuccess p").text(note);
            }
            $(".attentionMask").css("display", "block");
            $(".loginSuccess").css("display", "block");
            setTimeout(function(){
                $(".attentionMask").css("display", "none");
                $(".loginSuccess").css("display", "none");
                $(".loginSuccess p").text('报名成功');
            },3000);
        }
        if(result == -1){
            if(note){
                $(".loginFail p").text(note);
            }
            $(".attentionMask").css("display", "block");
            $(".loginFail").css("display", "block");
            setTimeout(function(){
                $(".attentionMask").css("display", "none");
                $(".loginFail").css("display", "none");
                $(".loginSuccess p").text('报名失败');
            },3000);
        }

        /************************  失焦判断  **********************************/
        $('input').bind('input onpropertychange',function() {
            $(this).parent().find(".spaninputName").css("color","#696969");
            if($(this).is(".isEmail")){             //邮箱判断
                var isEmail= /^([a-zA-Z0-9_-])/;
                if($(this).val()!==""){
                    if(!(isEmail.test($(this).val()))){
                        $(this).next(".inputTips").text("请输入正确的邮箱号");
                        $(this).css("border","1px solid #f4a723");
                        return false;
                    }else if(isEmail){
                        $(this).next(".inputTips").text("");
                        $(this).css("border","1px solid #d8d8d8");
                        return true;
                    }
                }else{
                    $(this).next(".inputTips").text("请输入您的邮箱号");
                    $(this).css("border","1px solid #f4a723");
                }
            }
            if($(this).is(".isNumber")){             //数字判断
                var isNumber= /^([0-9])/;
                if($(this).val()!==""){
                    if(!(isNumber.test($(this).val()))){
                        $(this).next(".inputTips").text("请输入正确的数字");
                        $(this).css("border","1px solid #f4a723");
                        return false;
                    }else if(isNumber){
                        $(this).next(".inputTips").text("");
                        $(this).css("border","1px solid #d8d8d8");
                        return true;
                    }
                }else{
                    $(this).next(".inputTips").text("请输入正确的数字");
                    $(this).css("border","1px solid #f4a723");
                }
            }
            if($(this).is(".username")){             //姓名判断
                var na=/^([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z]){2,20}$/;
                if($(this).val()!==""){
                    if(!(na.test($(this).val()))){
                        $(this).next(".inputTips").text("请输入正确的联系人");
                        $(this).css("border","1px solid #f4a723");
                        return false;
                    }else if(na){
                        $(this).next(".inputTips").text("");
                        $(this).css("border","1px solid #d8d8d8");
                        return true;
                    }
                }else{
                    $(this).next(".inputTips").text("请输入您的姓名");
                    $(this).css("border","1px solid #f4a723");
                }
            }
            if($(this).is(".isCardNo")){             //身份证判断
                var isCardNo=/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
                if($(this).val()!==""){
                    if(!(isCardNo.test($(this).val()))){
                        $(this).next(".inputTips").text("请输入正确的身份证号码");
                        $(this).css("border","1px solid #f4a723");
                        return false;
                    }else if(isCardNo){
                        $(this).next(".inputTips").text("");
                        $(this).css("border","1px solid #d8d8d8");
                        return true;
                    }
                }else{
                    $(this).next(".inputTips").text("请输入您的身份证号码");
                    $(this).css("border","1px solid #f4a723");
                }
            }
            if($(this).is(".isPhone")){
                var isPhone=/^1\d{10}$/; //手机
                if($("#isPhone").val()!==""){
                    if(!(isPhone.test($(this).val()))){
                        $(this).next(".inputTips").text("请输入正确的手机号码");
                        $(this).css("border","1px solid #f4a723");
                        return false;
                    }else if(isPhone){
                        $(this).next(".inputTips").text("");
                        $(this).css("border","1px solid #d8d8d8");
                        return true;
                    }
                }else{
                    $(this).next(".inputTips").text("请输入您的手机号码");
                    $(this).css("border","1px solid #f4a723");
                }
            }
            if($(this).is(".notnull")){
                if($(this).val()==="" || $(this).val().trim().length == 0){
                    $(this).next(".inputTips").text("此项不能为空");
                } else{
                    $(this).next(".inputTips").text("");
                    $(this).css("border","1px solid #d8d8d8");
                    return true;
                }
            }

        });
    });
</script>
<script>
    var check = true;
    function form_submit(){
        $(".notnull").each(function(){
            if($(this).val() == '' || $(this).val().trim().length == 0){
                $(this).next(".inputTips").text("此项不能为空");
                check = false;
            }
        });
        if($("#video").length > 0){
            if($("#video").val() == ''){
                $(this).next(".inputTips").text("请上传视频");
                check = false;
            }
        }
        var isEmail= /^([a-zA-Z0-9_-])/;
        $(".isEmail").each(function(){
            if($(this).val() != '' && !(isEmail.test($(this).val()))){
                $(this).next(".inputTips").text("请输入正确的邮箱格式");
                check = false;
            }
        });
        var isCardNo= /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
        $(".isCardNo").each(function(){
            if($(this).val() != '' && !(isCardNo.test($(this).val()))){
                $(this).next(".inputTips").text("请输入正确的身份证格式");
                check = false;
            }
        });
        var isPhone= /^1\d{10}$/;
        $(".isPhone").each(function(){
            if($(this).val() != '' && !(isPhone.test($(this).val()))){
                $(this).next(".inputTips").text("请输入正确的手机号码格式");
                check = false;
            }
        });
        var isNumber= /^([0-9])/;
        $(".isNumber").each(function(){
            if($(this).val() != '' && !(isNumber.test($(this).val()))){
                $(this).next(".inputTips").text("请输入正确的数字格式");
                check = false;
            }
        });
        if(check == false){
            $(".attentionMask").css("display", "block");
            $(".loginFail").css("display", "block");
            setTimeout(function(){
                $(".attentionMask").css("display", "none");
                $(".loginFail").css("display", "none");
                check = true;
            },1000);
            return false;
        }else{
            $("form .form").submit();
            return true;
        }
    }
</script>
<script src="/Public/projects/meeting/js/date.js"></script>
<script src="/Public/projects/meeting/js/jquer_shijian.js" type="text/javascript"></script>
<script type="text/javascript" src="/Public/projects/meeting/js/ydui.citys.js"></script>
<script type="text/javascript" src="/Public/projects/meeting/js/ydui.js"></script>
<script src="/Public/js/zepto.min.js"></script>
<script type="text/javascript">
    $("#video_show").hide();
    function getFileURL(file) {

        var getUrl = null;
        if (window.createObjectURL != undefined) { // basic
            getUrl = window.createObjectURL(file);
        } else if (window.URL != undefined) { // mozilla(firefox)
            getUrl = window.URL.createObjectURL(file);
        } else if (window.webkitURL != undefined) { // webkit or chrome
            getUrl = window.webkitURL.createObjectURL(file);
        }
        return getUrl;
    }
    $.extend($.fn, {
        fileUpload: function(opts) {
            this.each(function(){
                var $self = $(this);
                var doms = {
                    "fileToUpload": $self.find(".fileToUpload"),
                    "thumb": $self.find(".thumb"),
                    "progress": $self.find(".upload-progress")
                };
                var funs = {
                    //选择文件，获取文件大小，也可以在这里获取文件格式，限制用户上传非要求格式的文件
                    fileSelected: function() {
                        var files = (doms.fileToUpload)[0].files;
                        var count = files.length;
                        if(files[0].size > 200 * 1024 * 1024){

                        }else{
                            for (var index = 0; index < count; index++) {
                                var file = files[index];
                                var fileSize = 0;
                                if (file.size > 1024 * 1024)
                                    fileSize = (Math.round(file.size * 100 / (1024 * 1024)) / 100).toString() + 'MB';
                                else
                                    fileSize = (Math.round(file.size * 100 / 1024) / 100).toString() + 'KB';
                            }
                            funs.uploadFile();
                        }
                    },
                    //异步上传文件
                    uploadFile: function() {
                        var fd = new FormData();//创建表单数据对象
                        var files = (doms.fileToUpload)[0].files;
                        $("#fileName").text(files[0].name);
                        $(".loading").show();
                        $("#mask_new").css("display", "block");

                        var count = files.length;
                        for (var index = 0; index < count; index++) {
                            var file = files[index];
                            if(file.size > 200 * 1024 * 1024){
                                $("#tips").show();
                                $(".loading").hide();
                                $("#mask_new").css("display", "none");
                                return;
                            }
                            fd.append(opts.file, file);//将文件添加到表单数据中
                        }
                        var xhr = new XMLHttpRequest();
                        xhr.upload.addEventListener("progress", funs.uploadProgress, false);//监听上传进度
                        xhr.addEventListener("load", funs.uploadComplete, false);
                        xhr.addEventListener("error", opts.uploadFailed, false);
                        xhr.open("POST", opts.url);
                        xhr.send(fd);
                    },
                    uploadProgress: function(evt) {
                        if (evt.lengthComputable) {
                            var percentComplete = Math.round(evt.loaded * 100 / evt.total);
                            $("#qin_progress").css("width",percentComplete.toString() + '%');
                        }
                    },
                    uploadComplete: function(evt) {
                        $("#video").val(evt.target.responseText);
                        var files = (doms.fileToUpload)[0].files;
                        var url = getFileURL(files[0]);
                        $("#ori_img").hide();
                        var srcNew = "<source id='v1' src='"+url+"' ></source>";
                        $("#tips").hide();
                        $("#video_show").append(srcNew);
                        $("#video_show").show();
                        $(".fileToUpload").css("width", "50%");
                        $(".fileToUpload").css("margin-left", "50%");
                        $(".loading").hide();
                        $("#mask_new").css("display", "none");
                    }

                };
                doms.fileToUpload.on("change", function() {
                    doms.progress.find("span").width("0");
                    funs.fileSelected();
                });
            });
        }
    });
    $(".camera-area").fileUpload({
        "url" : "/Wap/Upload/upload_file",
        "file" : "myFile"
    });
    function init(){

        $(".datetime_shijian").each(function(){
            $(this).shijian();
        });
        $(".date_shijian").each(function(){
            $(this).shijian({
                Hour:false,
                Minute:false,
            });
        });
        $('.select-time').each(function(){
            $(this).hotelDate();
        });
        $(".J_Address").each(function(){
            var $target = $(this);

            $target.citySelect();

            $target.on('click', function (event) {
                event.stopPropagation();
                $target.citySelect('open');
            });

            $target.on('done.ydui.cityselect', function (ret) {
                $(this).val(ret.provance + ' ' + ret.city + ' ' + ret.area);
                $(this).nextAll(".province").val(ret.provance);
                $(this).nextAll(".city").val(ret.city);
                $(this).nextAll(".district").val(ret.area);
            });
        });
    }
    $(function(){
        init();
    });
</script>
<script>
    function ajaxIndex(ajaxMeetid, ajaxMenuid, ajaxIsregister, ajaxIsgetticket, obj){
        $.ajax({
            type: 'get',
            data:{
                meetId : ajaxMeetid,
                menuId : ajaxMenuid,
                is_register : ajaxIsregister,
                is_getticket : ajaxIsgetticket
            },
            url:"/Wap/Meeting/ajaxIndex",
            dataType: 'json',
            async: false,
            success:function(res){
                $(".insidepage").html('');
                var insidepagetext = '';
                if((!ajaxIsregister || !res['register_status']) && (res['img'] != '')) {
                    insidepagetext += '<div class="topbanner"> <img src="' + res['img'] + '" alt=""></div>';
                }
                insidepagetext += '<div class="tabBox">';
                var ajax_menu = res['menu'];
                var ajax_content = res['content'];
                if(ajax_menu != '' && !ajaxIsregister && !ajaxIsgetticket){
                    if(ajax_menu['type'] == 0){
                        insidepagetext += '<div class="imglist" ><ul class="ulimglist">';
                        for( var i=0; i < ajax_content.length; i++){
                            if(ajax_content[i]['type'] == 0){
                                if(ajax_content[i]['link'] != ''){
                                    insidepagetext += '<a href="' + ajax_content[i]['link'] + '">';
                                }
                                insidepagetext += "<li";
                                if(ajax_content[i]['content'] != ''){
                                    insidepagetext += " class='hasdetail'";
                                }
                                insidepagetext += "><img alt='' class='piclist' src='" + ajax_content[i]['picurl'] + "'>";
                                insidepagetext += '<p class="imglistName">' + ajax_content[i]['title'] + '</p>';
                                insidepagetext += '<p class="pabstract">' + ajax_content[i]['describe'] + '</p>';
                                if(ajax_content[i]['content'] != ''){
                                    insidepagetext += '<span class="amore colourway">详情&gt;&gt;</span><div class="person_detail" style="display: none">' + ajax_content[i]['content'] + '</div>';
                                }
                                insidepagetext += '</li>';
                                if(ajax_content[i]['link'] != ''){
                                    insidepagetext += '</a>';
                                }
                            }
                        }
                        insidepagetext += '</ul></div>';
                        if(res['item_more']){
                            insidepagetext += '<div class="listLoad"><span>下拉加载</span></div>';
                        }
                    }
                    if(ajax_menu['type'] == 1){
                        insidepagetext += '<div class="richTxt">';
                        insidepagetext += ajax_menu['content'];
                        insidepagetext += '</div>';
                    }
                    if(ajax_menu['type'] == 2){
                        insidepagetext += '<div class="borderTop"></div><div class="schedule">';
                        for( i=0; i < ajax_content.length; i++){
                            if(ajax_content[i]['type'] == 2) {
                                if (ajax_content[i]['describe'] == 0) {
                                    insidepagetext += '<ul class="ulSchedule"><li><div class="divSchedule"><span class="scheduleDate colourway">' + ajax_content[i]['title'];
                                    insidepagetext += '</span><span class="scheduleCont">' + ajax_content[i]['content'] + '</span></div></li></ul>';
                                }
                                if (ajax_content[i]['describe'] == 1) {
                                    insidepagetext += '<div class="ulSchedule2"> <p class="icon iconfont icon-icon-test colourway spanSchedule"><span>';
                                    insidepagetext += ajax_content[i]['title'] + '</span></p></div><div class="borderTop" style="height:20px;"></div>';
                                }
                                if (ajax_content[i]['describe'] == 2) {
                                    insidepagetext += '<ul class="ulSchedule2"><li><span class="scheduleTime2"><span class="spantopTime">' + ajax_content[i]['title'];
                                    insidepagetext += '</span><span class="spanBottom">' + ajax_content[i]['content'] + '</span></span></li></ul>';
                                }
                            }
                        }
                        insidepagetext += '</div>';
                        if(res['item_more']){
                            insidepagetext += '<div class="listLoad"><span>下拉加载</span></div>';
                        }
                    }
                    if(ajax_menu['type'] == 3){
                        for( i=0; i < ajax_content.length; i++){
                            if(ajax_content[i]['type'] == 3){
                                insidepagetext += '<img class="longimage" src="' + ajax_content[i]['picurl'] + '" alt="" >';
                            }
                        }
                        if(res['item_more']){
                            insidepagetext += '<div class="listLoad"><span>下拉加载</span></div>';
                        }
                    }
                    if((res['meet']['need_ticket'] != 0) && res['is_wx']){
                        insidepagetext += '<a onclick="ajaxIndex(' + res['meet']['meet_id'] + ',0,0,1)' + '"><span class="tickectInfo colourwaybg"><span class="font">查看电子票</span></span>';
                        if(res['ticket_count'] > 0){
                            insidepagetext += '<span class="messageTips"></span>';
                        }
                        insidepagetext += '</a>';
                    }
                }
                if(ajaxIsregister){
                    if(res['register_status'] == 1){
                        insidepagetext += '<div class="nostart"><p>报名未开始</p><p>' + "于" + $date_string + "开始报名" + '</p></div>';
                    }else if(res['register_status'] == 2){
                        insidepagetext += '<div class="finish"><p>你来迟了活动已结束</p></div>';
                    }else{
                        insidepagetext += '<form class="form" method="post" action="/Wap/Meeting/register"><div class="formTable">';
                        var field = res['field'];
                        for(i = 0; i < field.length; i++){
                            //--单行文本--
                            if(field[i]['type'] == 0){
                                insidepagetext += '<div class="divinput ';
                                if(field[i]['format'] == 3){
                                    insidepagetext += ' parentCls ';
                                }
                                insidepagetext += '">';
                                insidepagetext += '<span class="spaninputName">' + field[i]['name'];
                                if(field[i]['is_require'] == 1){
                                    insidepagetext += '<span class="spanrequire">*</span>';
                                }
                                insidepagetext += '</span>';
                                insidepagetext += '<input type="text" name="' + field[i]['field_id'] + '" class="inputTxt ';
                                if(field[i]['is_require'] == 1){
                                    insidepagetext += ' notnull ';
                                }
                                if(field[i]['format'] == 3){
                                    insidepagetext += ' inputElem isEmail';
                                }
                                if(field[i]['format'] == 1){
                                    insidepagetext += ' isNumber';
                                }
                                if(field[i]['format'] == 4){
                                    insidepagetext += ' isPhone';
                                }
                                if(field[i]['format'] == 5){
                                    insidepagetext += ' isCardNo';
                                }
                                insidepagetext += '"><span class="inputTips"></span></div>';
                            }
                            //--多行文本--
                            if(field[i]['type'] == 1){
                                insidepagetext += '<div class="multiText">';
                                insidepagetext += '<span class="spaninputName">' + field[i]['name'] + '</span>';
                                insidepagetext += '<textarea class="textArea" name="' + field[i]['field_id'] + '"></textarea><span class="inputTips"></span></div>';
                            }
                            //--单选--
                            if(field[i]['type'] == 2){
                                insidepagetext += '<div class="radioBox"><span class="radioName">' + field[i]['name'] + '</span><ul class="ulradio">';
                                var options = $.parseJSON(field[i]['option']);
                                for(var j=0; j < options.length; j++){
                                    insidepagetext += '<li><div class="radio-btn"><input type="radio" class="inputRadio" name="' + field[i]['field_id'] + '" value="' + options[j] + '"/></div><span class="radiolable">' + options[j] + '</span></li>';
                                }
                                insidepagetext += '</ul><span class="inputTips"></span></div>';
                            }
                            //--多选--
                            if(field[i]['type'] == 3){
                                insidepagetext += '<div class="check2Box"><span class="check2BoxName">' + field[i]['name'] + '</span><ul class="ulcheck">';
                                options = $.parseJSON(field[i]['option']);
                                for(j=0; j < options.length; j++){
                                    insidepagetext += '<li><div class="check-btn"><input type="checkbox" class="inputCheckbox" name="' + field[i]['field_id'] + '[]" value="' + options[j] + '"/></div><span class="checklable">' + options[j] + '</span></li>';
                                }
                                insidepagetext += '</ul><span class="inputTips"></span></div>';
                            }
                            //--图片--
                            if(field[i]['type'] == 4){
                                insidepagetext += '<input type="file" style="display: none">';
                                insidepagetext += '<div class="uploadimg" onclick="upload_img(this);"><span class="spaninputName">' + field[i]['name'] + '</span>';
                                insidepagetext += '<div class="preview" ><span id="imgditu"></span><img src="/Public/projects/meeting/images/kong.jpg"></div>';
                                insidepagetext += '<input type="text" name="' + field[i]['field_id'] + '" style="display: none">';
                                insidepagetext += '<span class="spanupload">(请上传5M以内的jpg/png)</span></div>';
                            }
                            if(field[i]['type'] == 7){
                                insidepagetext += '<div class="divinput"><span class="spaninputName">' + field[i]['name'] + '</span>';
                                insidepagetext += '<input type="text" value="" name="' + field[i]['field_id'] + '" class="inputTxt date_shijian"  placeholder="请选择时间"/></div>';
                            }
                            if(field[i]['type'] == 8){
                                insidepagetext += '<div class="divinput"><span class="spaninputName">' + field[i]['name'] + '</span>';
                                insidepagetext += '<input type="text" value="" name="' + field[i]['field_id'] + '" class="inputTxt datetime_shijian"  placeholder="请选择日期"/></div>';
                            }
                            if(field[i]['type'] == 9){
                                insidepagetext += '<div class="row select-time divinput"><span class="spaninputName">' + field[i]['name'] + '</span>';
                                insidepagetext += '<div class="timeinput"><span class="time entertime"></span><input type="text" name="start' + field[i]['field_id'] + '" class="input-enter none">';
                                insidepagetext += '<span class="timearrow"></span><span class="time leavetime"></span>';
                                insidepagetext += '<input type="text" class="input-leave none" name="end' + field[i]['field_id'] + '"></div></div>';
                            }
                            if(field[i]['type'] == 10){
                                insidepagetext += '<input type="hidden" id="video" name="' + field[i]['field_id'] + '">'+
                                '<div class="camera-area">' +
                                    '<form enctype="multipart/form-data" method="post">' +
                                    '<div class="upload-block">' +
                                    '<div class="upload-title required">上传视频（请上传200M以内的视频）</div>' +
                                    '<div  class="upload-title" style="color: red;display: none;" id="tips">上传视频太大！</div>' +
                                    '<div class="upload-cover bg" id="ori_img">' +
                                    '<img></div>' +
                                    '<div class="upload-tips">点击上传视频</div>' +
                                    '<input class="fileToUpload" name="fileToUpload" type="file" accept="video/*">' +
                                    '<video id="video_show" controls="controls" style="width:100px;height:100px;" ></video>' +
                                    '</div></form>' + '</div>';
                            }
                            if(field[i]['type'] == 5){
                                insidepagetext += '<div class="divinput"><span class="spaninputName">' + field[i]['name'] + '</span>';
                                insidepagetext += '<input type="text" class="inputTxt J_Address" placeholder="请输入所在地区" readonly>';
                                insidepagetext += '<input class="province" type="hidden" name="province' + field[i]['field_id'] + '">';
                                insidepagetext += '<input class="city" type="hidden" name="city' + field[i]['field_id'] + '">';
                                insidepagetext += '<input class="district" type="hidden" name="district' + field[i]['field_id'] + '">';
                                insidepagetext += '<span class="inputTips"></span></div>';
                            }
                            if(field[i]['type'] == 6){
                                insidepagetext += '<div class="divinput"><span class="spaninputName">' + field[i]['name'] + '</span>';
                                insidepagetext += '<input type="text" class="inputTxt J_Address" placeholder="请输入所在地区" readonly>';
                                insidepagetext += '<input class="province" type="hidden" name="province' + field[i]['field_id'] + '">';
                                insidepagetext += '<input class="city" type="hidden" name="city' + field[i]['field_id'] + '">';
                                insidepagetext += '<input class="district" type="hidden" name="district' + field[i]['field_id'] + '">';
                                insidepagetext += '<span class="inputTips"></span></div>';
                                insidepagetext += '<div class="multiText"><textarea class="textArea" name="address';
                                insidepagetext += field[i]['field_id'] + '" placeholder="请输入详细地址"></textarea><span class="inputTips"></span></div>';
                            }
                        }
                        if(res['meet']['eat_service'] != 0){
                            insidepagetext += '<div class="expandBox"><div class="unexpand"><span class="spanName">餐饮' +
                                '<span class="spanTips">（是否）</span></span><button class="switch"><span change="开" class="offBtn">关</span>';
                            insidepagetext += '<input type="hidden" value="0" name="is_eat"/></button></div><div class="expandPart"><div class="divinput">';
                            insidepagetext += '<span class="spaninputName">用餐人数</span>';
                            insidepagetext += '<input  type="number" class="inputTxt" placeholder="请输入用餐人数" name="eat_person"></div>';
                            insidepagetext += '<div class="divTextarea"><span class="spaninputName">备注内容</span>';
                            insidepagetext += '<textarea placeholder="选项卡标题" class="textArea" name="eat_note"></textarea></div></div></div>';
                        }
                        if(res['meet']['hotel_service'] != 0){
                            insidepagetext += '<div class="expandBox"><div class="unexpand"><span class="spanName">住宿' +
                                '<span class="spanTips">（是否）</span></span><button class="switch">' +
                                '<span change="开" class="offBtn">关</span><input type="hidden" value="0" name="is_hotel"/>' +
                                '</button></div><div class="expandPart"><div class="divinput"><span class="spaninputName">住宿人数</span>' +
                                '<input type="number" class="inputTxt" placeholder="请输入住宿人数" name="hotel_person"></div>' +
                                '<div class="divTextarea"><span class="spaninputName">备注内容</span>' +
                                '<textarea placeholder="选项卡标题" class="textArea" name="hotel_note"></textarea></div></div></div>';
                        }
                        if(res['meet']['bus_service'] != 0){
                            insidepagetext += '<div class="expandBox"><div class="unexpand"><span class="spanName">乘车' +
                                '<span class="spanTips">（是否）</span></span><button class="switch">' +
                                '<span change="开" class="offBtn">关</span><input type="hidden" value="0" name="is_bus"/>' +
                                '</button></div><div class="expandPart"><div class="divinput">' +
                                '<span class="spaninputName">乘车数</span>' +
                                '<input type="number" class="inputTxt" placeholder="请输入用餐人数" name="bus_person">' +
                                '</div><div class="divTextarea"><span class="spaninputName">备注内容</span>' +
                                '<textarea placeholder="选项卡标题" class="textArea" name="bus_note"></textarea></div></div></div>';
                        }
                        insidepagetext += '<input type="hidden" name="meetId" value="' + res['meet']['meet_id'] + '">';
                        if(res['meet']['live'] != ''){
                            var live_arr = split("|", res['meet']['live']);
                            if(live_arr.indexOf(2) != -1){
                                insidepagetext += '<div class="multiText">';
                                insidepagetext += '<span class="spaninputName">祝福语：</span>';
                                insidepagetext += '<textarea class="textArea" name="wish"></textarea><span class="inputTips"></span></div>';
                            }
                        }
                        insidepagetext += '<div class="divLoginbtn"><input class="colourwaybg registeredBtn" type="submit" onclick="return form_submit();" value="提&nbsp;&nbsp;&nbsp;&nbsp;交" id="loginBtn"/></div>';
                        if((res['meet']['need_ticket'] != 0) && res['is_wx']){
                            insidepagetext += '<a onclick="ajaxIndex(' + res['meet']['meet_id'] + ',0,0,1)' + '"><span class="tickectInfo colourwaybg"><span class="font">查看电子票</span></span>';
                            if(res['ticket_count'] > 0){
                                insidepagetext += '<span class="messageTips"></span>';
                            }
                            insidepagetext += '</a>';
                        }
                        insidepagetext += '</div></form>';
                    }
                }
                if(ajaxIsgetticket){
                    insidepagetext += '<div class="ticketlist"><div class="ticketBar colourway colourwayBoder"><span class="spanTicket colourway">电子票</span><i class="icon iconfont icon-dianzifapiao"></i></div>';
                    var ajax_users = res['users'];
                    for(i = 0; i < ajax_users.length; i++){
                        var div_ticket_state = "ticketState penusedBlock";
                        var span = "penspanused";
                        var span_state = "penusedstate";
                        var status = "待使用";
                        if(ajax_users[i]['status'] == 0){
                            div_ticket_state = "ticketState examineBlock";
                            span = "spanExamine";
                            span_state = "examineState";
                            status = "审核中";
                        }
                        if(ajax_users[i]['status'] == 2){
                            div_ticket_state = "ticketState unExamineBlock";
                            span = "spanunExamine";
                            span_state = "unexamineState";
                            status = "未通过审核";
                        }
                        if(ajax_users[i]['status'] == 3){
                            div_ticket_state = "ticketState usedBlock";
                            span = "spanused";
                            span_state = "used";
                            status = "已使用";
                        }
                        insidepagetext += '<div class="' + div_ticket_state + '" data-user-id="' + ajax_users[i]['user_id'] +  '" data-user-result="' +
                            ajax_users[i]['result'] + '" data-user-ticket="' + ajax_users[i]['ticket'] + '" data-meet-id="' + ajax_users[i]['meet_id'] + '"><span class="' +
                            span + '"></span><span class="ticketName">' + ajax_users[i]['query_value1'] + '</span><span class="activtiName">'
                                + res['meet']['name'] + '</span><span class="' + span_state + '">' + status + '</span><span class="arrow"></span></div>';
                    }
                    insidepagetext += '</div></div>';
                }
                $(".insidepage").html(insidepagetext);
                $("#navBar").find(".colourway").css("color",'');
                $("#navBar").find(".colourway").removeClass("colourway");
                if(obj){
                    $(obj).addClass("colourway");
                }
                init();
                common_init();
                page = 0;
                menuId = ajax_menu['menu_id'];
                type = ajax_menu['type'];
                end = 0;
            }
        });
        return false;
    }
</script>
<script src="/Public/js/common/baidutongji.js"></script>
</body>
</html>
